package dataStructure._06_Binary_Search_Tree._02_Binary_Search_Tree_Basics;

/**
 *二分搜索树
 *     1.是二叉树
 *     2.每个节点的值
 *         大于左子树
 *         小于右子树
 *         每一颗子树也是二分搜索树
 *     3.并不一定是满二叉树
 *     4.存储的元素必须就有可比较性
 * @param <E>
 */
public class BST<E extends Comparable<E>> {

    private class Node {
        public E e;
        public Node left, right;

        public Node(E e) {
            this.e = e;
            left = null;
            right = null;
        }
    }

    private Node root;
    private int size;

    public BST(){
        root = null;
        size = 0;
    }

    public int size(){
        return size;
    }

    public boolean isEmpty(){
        return size == 0;
    }


}
